package com.foreknow.demo5;

import java.util.Scanner;

public class TestManager {

    public void a(String s) {
        System.out.println(s);
    }

    public String b() {
        String str = "b";
        return str;
    }

    public void c(Student s) {
        System.out.println(s.name);
    }

    public Student d() {
        Student s = new Student();
        s.name = "gibson";
        return s;
    }

    public Scanner e() {
        Scanner a = new Scanner(System.in);
        return a;
    }

    public void f(Scanner a){
        System.out.println(a.nextInt());
    }


    public static void main(String[] args) {
        //1. 创建当前类的对象
        TestManager manager = new TestManager();
        Scanner input = manager.e();
        System.out.println(input.next());

        Scanner scanner = new Scanner(System.in);
        manager.f(scanner);


        manager.a("test a");
        String s = manager.b();
        System.out.println(s);
        Student s1 = new Student();
        s1.name = "fender";
        manager.c(s1);
        Student ss = manager.d();
        System.out.println(ss.name);
    }

}
